<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>原文输出</title>
</head>
<body>
	<div id="container"></div>
	<script src="js/template-web.js"></script>
	<script type="text/html" id="tpl">
		<div>
			<span>姓名：{{@ name}}</span>
			<span>年龄：{{age}}</span>
		</div>
	</script>
	<script>
		var data = {
			name: '<b>李四</b>',
			age: 30
		}

		// 这是告诉模板引擎将模板id为tpl的模板和data数据对象进行拼接
		var html = template('tpl', data);
		document.getElementById('container').innerHTML = html;
	</script>
</body>
</html>